package com.fy.service;

import com.fy.pojo.dto.fileshare.ShareSessionDTO;
import com.fy.pojo.dto.fileshare.ShowShareFileQueryDTO;
import com.fy.pojo.entity.FileInfo;
import com.fy.pojo.vo.file.FoloderVO;
import com.fy.pojo.vo.user.LoginUserVO;
import com.fy.utils.result.PageResult;
import com.fy.utils.result.Result;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface ShowShareService {

    /**获取分享文件信息
     *
     * @param shareId
     * @return
     */
    Result getShareInfo(String shareId,HttpSession httpSession);

    /**校验分享码
     *  @param shareId
     * @param code
     * @return
     */
    ShareSessionDTO checkShareCode(HttpSession httpSession,String shareId, String code);

    /**提取分享文件
     *
     * @param showShareFileQueryDTO
     * @return
     */
    PageResult loadFileList(HttpSession httpSession,ShowShareFileQueryDTO showShareFileQueryDTO);

    /**获取发现文件夹目录信息
     *
     * @param path
     * @return
     */
    List<FoloderVO> getFolderInfo(String path);

    /**获取文件路径
     *
     * @return
     */
    FileInfo getFilePath(String fileId);

    /**创建下载路径
     *
     * @param fileId
     * @return
     */
    String createDownloadURL(String fileId);

    /**保存分享文件
     *
     * @param loginUserVO
     * @param shareId
     * @param shareFileIds
     * @param myFolderId
     */
    void saveShare(LoginUserVO loginUserVO, String shareId, String shareFileIds, String myFolderId);

    /**
     * 加载文件夹
     * @param filePid
     * @return
     */
    List<FileInfo> loadMyFolder(HttpSession httpSession,String filePid);
}
